package student.aistar.day11.compares;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class TestTeacherSort {
    public static void main(String[] args) {
        Teacher t1 = new Teacher(1,"tom",23);
        Teacher t2 = new Teacher(2,"jack",25);
        Teacher t3 = new Teacher(3,"james",18);
        Teacher t4 = new Teacher(4,"rose",17);

        List<Teacher> list = new ArrayList<>();
        list.add(t1);
        list.add(t2);
        list.add(t3);
        list.add(t4);

        Collections.sort(list);

        System.out.println(list);
    }
}
